!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('', tClose: "Close (Esc)", tLoading: "Loading...", autoFocusLast: !0 }}, a.fn.magnificPopup=function(c){ A(); var d=a(this); if("string"==typeof c) if("open"===c){ var e, f=u ? d.data("magnificPopup"):d[0].magnificPopup, g=parseInt(arguments[1], 10)||0; f.items ? e=f.items[g]:(e=d, f.delegate&&(e=e.find(f.delegate)), e=e.eq(g)), b._openClick({ mfpEl: e }, d, f) } else b.isOpen&&b[c].apply(b, Array.prototype.slice.call(arguments, 1)); else c=a.extend(!0, {}, c), u ? d.data("magnificPopup", c):d[0].magnificPopup=c, b.addGroup(d, c); return d }; var C, D, E, F="inline", G=function(){ E&&(D.after(E.addClass(C)).detach(), E=null) }; a.magnificPopup.registerModule(F, { options: { hiddenClass: "hide", markup: "", tNotFound: "Content not found" }, proto: { initInline: function(){ b.types.push(F), w(h + "." + F, function(){ G() }) }, getInline: function(c, d){ if(G(), c.src){ var e=b.st.inline, f=a(c.src); if(f.length){ var g=f[0].parentNode; g&&g.tagName&&(D||(C=e.hiddenClass, D=x(C), C="mfp-" + C), E=f.after(D).detach().removeClass(C)), b.updateStatus("ready") } else b.updateStatus("error", e.tNotFound), f=a("
"); return c.inlineElement=f, f } return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d }} }); var H, I="ajax", J=function(){ H&&a(document.body).removeClass(H) }, K=function(){ J(), b.req&&b.req.abort() }; a.magnificPopup.registerModule(I, { options: { settings: null, cursor: "mfp-ajax-cur", tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ b.types.push(I), H=b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) }, getAjax: function(c){ H&&a(document.body).addClass(H), b.updateStatus("loading"); var d=a.extend({ url: c.src, success: function(d, e, f){ var g={ data: d, xhr: f }; y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function(){ b.wrap.addClass(q) }, 16), b.updateStatus("ready"), y("AjaxContentAdded") }, error: function(){ J(), c.finished=c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) }}, b.st.ajax.settings); return b.req=a.ajax(d), "" }} }); var L, M=function(c){ if(c.data&&void 0!==c.data.title) return c.data.title; var d=b.st.image.titleSrc; if(d){ if(a.isFunction(d)) return d.call(b, c); if(c.el) return c.el.attr(d)||"" } return "" }; a.magnificPopup.registerModule("image", { options: { markup: '
', cursor: "mfp-zoom-out-cur", titleSrc: "title", verticalFit: !0, tError: 'The image could not be loaded.' }, proto: { initImage: function(){ var c=b.st.image, d=".image"; b.types.push("image"), w(m + d, function(){ "image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor) }), w(h + d, function(){ c.cursor&&a(document.body).removeClass(c.cursor), v.off("resize" + p) }), w("Resize" + d, b.resizeImage), b.isLowIE&&w("AfterChange", b.resizeImage) }, resizeImage: function(){ var a=b.currItem; if(a&&a.img&&b.st.image.verticalFit){ var c=0; b.isLowIE&&(c=parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c) }}, _onImageHasSize: function(a){ a.img&&(a.hasSize = !0, L&&clearInterval(L), a.isCheckingImgSize = !1, y("ImageHasSize", a), a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"), a.imgHidden = !1)) }, findImageSize: function(a){ var c=0, d=a.img[0], e=function(f){ L&&clearInterval(L), L=setInterval(function(){ return d.naturalWidth > 0 ? void b._onImageHasSize(a):(c > 200&&clearInterval(L), c++, void(3===c ? e(10):40===c ? e(50):100===c&&e(500))) }, f) }; e(1) }, getImage: function(c, d){ var e=0, f=function(){ c&&(c.img[0].complete ? (c.img.off(".mfploader"), c===b.currItem&&(b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, y("ImageLoadComplete")):(e++, 200 > e ? setTimeout(f, 100):g())) }, g=function(){ c&&(c.img.off(".mfploader"), c===b.currItem&&(b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0) }, h=b.st.image, i=d.find(".mfp-img"); if(i.length){ var j=document.createElement("img"); j.className="mfp-img", c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")), c.img=a(j).on("load.mfploader", f).on("error.mfploader", g), j.src=c.src, i.is("img")&&(c.img=c.img.clone()), j=c.img[0], j.naturalWidth > 0 ? c.hasSize = !0:j.width||(c.hasSize = !1) } return b._parseMarkup(d, { title: M(c), img_replaceWith: c.img }, c), b.resizeImage(), c.hasSize ? (L&&clearInterval(L), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))):(d.removeClass("mfp-loading"), b.updateStatus("ready")), d):(b.updateStatus("loading"), c.loading = !0, c.hasSize||(c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d) }} }); var N, O=function(){ return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform), N }; a.magnificPopup.registerModule("zoom", { options: { enabled: !1, easing: "ease-in-out", duration: 300, opener: function(a){ return a.is("img") ? a:a.find("img") }}, proto: { initZoom: function(){ var a, c=b.st.zoom, d=".zoom"; if(c.enabled&&b.supportsTransition){ var e, f, g=c.duration, j=function(a){ var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), d="all " + c.duration / 1e3 + "s " + c.easing, e={ position: "fixed", zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden" }, f="transition"; return e["-webkit-" + f]=e["-moz-" + f]=e["-o-" + f]=e[f]=d, b.css(e), b }, k=function(){ b.content.css("visibility", "visible") }; w("BuildControls" + d, function(){ if(b._allowZoom()){ if(clearTimeout(e), b.content.css("visibility", "hidden"), a=b._getItemToZoom(), !a) return void k(); f=j(a), f.css(b._getOffset()), b.wrap.append(f), e=setTimeout(function(){ f.css(b._getOffset(!0)), e=setTimeout(function(){ k(), setTimeout(function(){ f.remove(), a=f = null, y("ZoomAnimationEnded") }, 16) }, g) }, 16) }}), w(i + d, function(){ if(b._allowZoom()){ if(clearTimeout(e), b.st.removalDelay=g, !a){ if(a=b._getItemToZoom(), !a) return; f=j(a) } f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function(){ f.css(b._getOffset()) }, 16) }}), w(h + d, function(){ b._allowZoom()&&(k(), f&&f.remove(), a=null) }) }}, _allowZoom: function(){ return "image"===b.currItem.type }, _getItemToZoom: function(){ return b.currItem.hasSize ? b.currItem.img:!1 }, _getOffset: function(c){ var d; d=c ? b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem); var e=d.offset(), f=parseInt(d.css("padding-top"), 10), g=parseInt(d.css("padding-bottom"), 10); e.top -=a(window).scrollTop() - f; var h={ width: d.width(), height: (u ? d.innerHeight():d[0].offsetHeight) - g - f }; return O() ? h["-moz-transform"]=h.transform="translate(" + e.left + "px," + e.top + "px)":(h.left=e.left, h.top=e.top), h }} }); var P="iframe", Q="//about:blank", R=function(a){ if(b.currTemplate[P]){ var c=b.currTemplate[P].find("iframe"); c.length&&(a||(c[0].src=Q), b.isIE8&&c.css("display", a ? "block":"none")) }}; a.magnificPopup.registerModule(P, { options: { markup: '
', srcAction: "iframe_src", patterns: { youtube: { index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1" }, vimeo: { index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1" }, gmaps: { index: "//maps.google.", src: "%id%&output=embed" }} }, proto: { initIframe: function(){ b.types.push(P), w("BeforeChange", function(a, b, c){ b!==c&&(b===P ? R():c===P&&R(!0)) }), w(h + "." + P, function(){ R() }) }, getIframe: function(c, d){ var e=c.src, f=b.st.iframe; a.each(f.patterns, function(){ return e.indexOf(this.index) > -1 ? (this.id&&(e="string"==typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length):this.id.call(this, e)), e=this.src.replace("%id%", e), !1):void 0 }); var g={}; return f.srcAction&&(g[f.srcAction]=e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d }} }); var S=function(a){ var c=b.items.length; return a > c - 1 ? a - c:0 > a ? c + a:a }, T=function(a, b, c){ return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) }; a.magnificPopup.registerModule("gallery", { options: { enabled: !1, arrowMarkup: '', preload: [0, 2], navigateByImgClick: !0, arrows: !0, tPrev: "Previous (Left arrow key)", tNext: "Next (Right arrow key)", tCounter: "%curr% of %total%" }, proto: { initGallery: function(){ var c=b.st.gallery, e=".mfp-gallery"; return b.direction = !0, c&&c.enabled ? (f +=" mfp-gallery", w(m + e, function(){ c.navigateByImgClick&&b.wrap.on("click" + e, ".mfp-img", function(){ return b.items.length > 1 ? (b.next(), !1):void 0 }), d.on("keydown" + e, function(a){ 37===a.keyCode ? b.prev():39===a.keyCode&&b.next() }) }), w("UpdateStatus" + e, function(a, c){ c.text&&(c.text=T(c.text, b.currItem.index, b.items.length)) }), w(l + e, function(a, d, e, f){ var g=b.items.length; e.counter=g > 1 ? T(c.tCounter, f.index, g):"" }), w("BuildControls" + e, function(){ if(b.items.length > 1&&c.arrows&&!b.arrowLeft){ var d=c.arrowMarkup, e=b.arrowLeft=a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), f=b.arrowRight=a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s); e.click(function(){ b.prev() }), f.click(function(){ b.next() }), b.container.append(e.add(f)) }}), w(n + e, function(){ b._preloadTimeout&&clearTimeout(b._preloadTimeout), b._preloadTimeout=setTimeout(function(){ b.preloadNearbyImages(), b._preloadTimeout=null }, 16) }), void w(h + e, function(){ d.off(e), b.wrap.off("click" + e), b.arrowRight=b.arrowLeft=null })):!1 }, next: function(){ b.direction = !0, b.index=S(b.index + 1), b.updateItemHTML() }, prev: function(){ b.direction = !1, b.index=S(b.index - 1), b.updateItemHTML() }, goTo: function(a){ b.direction=a >=b.index, b.index=a, b.updateItemHTML() }, preloadNearbyImages: function(){ var a, c=b.st.gallery.preload, d=Math.min(c[0], b.items.length), e=Math.min(c[1], b.items.length); for (a=1; a <=(b.direction ? e:d); a++) b._preloadItem(b.index + a); for (a=1; a <=(b.direction ? d:e); a++) b._preloadItem(b.index - a) }, _preloadItem: function(c){ if(c=S(c), !b.items[c].preloaded){ var d=b.items[c]; d.parsed||(d=b.parseEl(c)), y("LazyLoad", d), "image"===d.type&&(d.img=a('').on("load.mfploader", function(){ d.hasSize = !0 }).on("error.mfploader", function(){ d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) }).attr("src", d.src)), d.preloaded = !0 }} }}); var U="retina"; a.magnificPopup.registerModule(U, { options: { replaceSrc: function(a){ return a.src.replace(/\.\w+$/, function(a){ return "@2x" + a }) }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var a=b.st.retina, c=a.ratio; c=isNaN(c) ? c():c, c > 1&&(w("ImageHasSize." + U, function(a, b){ b.img.css({ "max-width": b.img[0].naturalWidth / c, width: "100%" }) }), w("ElementParse." + U, function(b, d){ d.src=a.replaceSrc(d, c) })) }} }}), A() }); (function (root, factory){ if(typeof define==='function'&&define.amd){ define([], factory); }else if(typeof module==='object'&&module.exports){ module.exports=factory(); }else{ root.html5tooltips=factory(); }}(this, function (){ 'use strict'; var tooltipHTML='\
\
\
\
\
\
\
\
\ ', html5tooltipsPredefined={ animateFunction: { fadeIn: "fadein", foldIn: "foldin", foldOut: "foldout", roll: "roll", scaleIn: "scalein", slideIn: "slidein", spin: "spin" }, color: { "daffodil": {r: 255, g: 230, b: 23}, "daisy": {r: 250, g: 211, b: 28}, "mustard": {r: 253, g: 183, b: 23}, "citrus zest": {r: 250, g: 170, b: 33}, "pumpkin": {r: 241, g: 117, b: 63}, "tangerine": {r: 237, g: 87, b: 36}, "salmon": {r: 240, g: 70, b: 57}, "persimmon": {r: 234, g: 40, b: 48}, "rouge": {r: 188, g: 35, b: 38}, "scarlet": {r: 140, g: 12, b: 3}, "hot pink": {r: 229, g: 24, b: 93}, "princess": {r: 243, g: 132, b: 174}, "petal": {r: 250, g: 198, b: 210}, "lilac": {r: 178, g: 150, b: 199}, "lavender": {r: 123, g: 103, b: 174}, "violet": {r: 95, g: 53, b: 119}, "cloud": {r: 195, g: 222, b: 241}, "dream": {r: 85, g: 190, b: 237}, "gulf": {r: 49, g: 168, b: 224}, "turquoise": {r: 35, g: 138, b: 204}, "sky": {r: 13, g: 96, b: 174}, "indigo": {r: 20, g: 59, b: 134}, "navy": {r: 0, g: 27, b: 74}, "sea foam": {r: 125, g: 205, b: 194}, "teal": {r: 0, g: 168, b: 168}, "peacock": {r: 18, g: 149, b: 159}, "ceadon": {r: 193, g: 209, b: 138}, "olive": {r: 121, g: 145, b: 85}, "bamboo": {r: 128, g: 188, b: 66}, "grass": {r: 74, g: 160, b: 63}, "kelly": {r: 22, g: 136, b: 74}, "forrest": {r: 0, g: 63, b: 46}, "chocolate": {r: 56, g: 30, b: 17}, "terra cotta": {r: 192, g: 92, b: 32}, "camel": {r: 191, g: 155, b: 107}, "linen": {r: 233, g: 212, b: 167}, "stone": {r: 231, g: 230, b: 225}, "smoke": {r: 207, g: 208, b: 210}, "steel": {r: 138, g: 139, b: 143}, "slate": {r: 119, g: 133, b: 144}, "charcoal": {r: 71, g: 77, b: 77}, "black": {r: 5, g: 6, b: 8}, "white": {r: 255, g: 255, b: 255}, "metalic silver": {r: 152, g: 162, b: 171}, "metalic gold": {r: 159, g: 135, b: 89}, "metalic copper": {r: 140, g: 102, b: 65}}, stickTo: { bottom: "bottom", left: "left", right: "right", top: "top" }}, defaultOptions={ animateDuration: 300, animateFunction: html5tooltipsPredefined.animateFunction.fadeIn, delay: 500, disableAnimation: false, hideDelay: 300, persistent: false, stickTo: html5tooltipsPredefined.stickTo.bottom, stickDistance: 10 }; function Component(publicInterface,HTML){ function toArray(obj,fromIndex){ return Array.prototype.slice.call(obj,fromIndex); } function argsToObj(args){ var argTypes=toArray(args).map(function(a){return typeof a}); var obj={}; if(argTypes[0]==='object') obj=args[0]; else if(argTypes[0]==='string'){ var keys=args[0].split(' '); for(var i in keys) obj[keys[i]]=args[1]; } else if(argTypes[0]==='function') obj={'':args[0]}; return obj; } function gainAnchorElements(elements,anchors){ var attrName; for(var i=0;i maxWidth ? maxWidth + "px":"auto"; targetRect=component.model.target.getBoundingClientRect(); ttRect=ttElement.getBoundingClientRect(); switch (ttModel.stickTo){ case html5tooltipsPredefined.stickTo.bottom: ttElement.style.left=targetRect.left + parseInt((targetRect.width - ttRect.width) / 2) + "px"; ttElement.style.top=targetRect.top + targetRect.height + parseInt(ttModel.stickDistance) + "px"; break; case html5tooltipsPredefined.stickTo.left: ttElement.style.left=targetRect.left - ttRect.width - parseInt(ttModel.stickDistance) + "px"; ttElement.style.top=targetRect.top + (targetRect.height - ttRect.height) / 2 + "px"; break; case html5tooltipsPredefined.stickTo.right: ttElement.style.left=targetRect.left + targetRect.width + parseInt(ttModel.stickDistance) + "px"; ttElement.style.top=targetRect.top + (targetRect.height - ttRect.height) / 2 + "px"; break; case html5tooltipsPredefined.stickTo.top: ttElement.style.left=targetRect.left + (targetRect.width - ttRect.width) / 2 + "px"; ttElement.style.top=targetRect.top - ttRect.height - parseInt(ttModel.stickDistance) + "px"; break; }} function show(){ isHiding=false; if(ttElement.style.visibility!=='visible'){ ttElement.style.visibility='visible'; setTimeout(function(){ moveTooltip(); applyAnimationClass(elBox, ttModel.animateFunction + "-from", ttModel.animateFunction + "-to"); }); } return this; } function showMore(){ if(ttElement.style.visibility!=='visible'){ ttElement.style.visibility='visible'; applyAnimationClass(elBox, ttModel.animateFunction + "-from", ttModel.animateFunction + "-to"); if(ttModel.contentMore){ elMore.style.display='block'; elMore.style.visibility='visible'; } moveTooltip(); } else if(elMore.style.display!=='block'&&ttModel.contentMore){ elMore.style.display='block'; animateElementClass(ttElement); moveTooltip(); var h=elMore.getBoundingClientRect().height; elMore.style.visibility='visible'; elMore.style.height='0px'; animateElementClass(elMore, function(){ elMore.style.height=h > 0 ? h + 'px':"auto"; }); } return this; } var component=new Component(this,tooltipHTML), elBox=component.anchors.box[0], elText=component.anchors.text[0], elMore=component.anchors.more[0], elMoreText=component.anchors.moreText[0], ttElement=component.elements[0], isHiding=false; resetTooltipPosition(); if(typeof window!=='undefined'){ window.addEventListener("resize", moveTooltip, false); window.addEventListener("scroll", moveTooltip, false); } component.set(defaultOptions); var ttModel=component.model; component.onModelUpdate({ color:function(color){ if(html5tooltipsPredefined.color[color]){ color=html5tooltipsPredefined.color[color]; color="rgb(" + color.r + ", " + color.g + ", " + color.b + ")"; } elBox.style.backgroundColor=color; }, contentText:function(text){ component.anchors.text[0].innerHTML=text; }, contentMore:function(more){ component.anchors.moreText[0].innerHTML=more; }, stickTo:function(stickTo){ component.elements[0].className="html5tooltip-" + stickTo; }}); this.hide=hide; this.show=show; this.showMore=showMore; this.moveTooltip=moveTooltip; component.publ.unmount=function(){ resetTooltipPosition(); component.unmount(); }} var userTooltips=[],DOMTooltips=[]; function createTooltip(target,options,tooltips){ var tooltip; for(var i=tooltips.length;i--;) if(tooltips[i].model.target===target){ tooltip=tooltips[i]; break; } if(!tooltip){ tooltip=new HTML5TooltipUIComponent; tooltips.push(tooltip); } tooltip.set(options); tooltip.set('target',target); var hovered,focused; function tryUnmountTooltip(){ if(target===hovered||tooltip.element===hovered) return; if(tooltip.model.persistent) tooltip.hide(function(){ tooltip.unmount(); }); else tooltip.unmount(); } function disposeTooltip(){ hovered=null; if(target===focused) return; if(tooltip.model.persistent) setTimeout(tryUnmountTooltip, tooltip.model.hideDelay); else tryUnmountTooltip(); } target.addEventListener("mouseenter",function(){ if(this===hovered||this===focused) return; hovered=this; setTimeout(function(){ if(this===hovered){ tooltip.mount(); tooltip.show(); }}.bind(this), tooltip.model.delay); }); target.addEventListener("mouseleave",disposeTooltip); target.addEventListener("focus",function(){ if(["INPUT", "TEXTAREA"].indexOf(this.tagName)===-1 && this.getAttribute("contenteditable")===null) return; focused=this; tooltip.mount(); tooltip.showMore(); }); target.addEventListener("blur",function(){ focused=null; if(hovered!==tooltip.element){ tooltip.unmount(); }}); tooltip.element.addEventListener("mouseenter",function(){ hovered=this; }); tooltip.element.addEventListener("mouseleave",disposeTooltip); } function getElementsByAttribute(attr, context){ var nodeList=(context||document).getElementsByTagName('*'), nodes=[]; for (var i=0, node; node=nodeList[i]; i++){ if(node.getAttribute(attr)) nodes.push(node); } return nodes; } function extractOptionAttribute(target, attrName, defaultValue){ var value=target.getAttribute(attrName), nextParent=target; while(!value&&(nextParent=nextParent.parentNode)&&nextParent.getAttribute) value=nextParent.getAttribute(attrName); return value||defaultValue; } function createDOMTooltips(){ getElementsByAttribute("data-tooltip").forEach(function(target){ var options={ animateFunction: extractOptionAttribute(target, "data-tooltip-animate-function", defaultOptions.animateFunction), color: extractOptionAttribute(target, "data-tooltip-color", ''), contentMore: extractOptionAttribute(target, "data-tooltip-more", ''), contentText: extractOptionAttribute(target, "data-tooltip", ''), delay: extractOptionAttribute(target, "data-tooltip-delay", defaultOptions.delay), hideDelay: extractOptionAttribute(target, "data-tooltip-hide-delay", defaultOptions.delay), maxWidth: extractOptionAttribute(target, "data-tooltip-maxwidth", 'auto'), persistent: extractOptionAttribute(target, "data-tooltip-persistent", defaultOptions.persistent), stickTo: extractOptionAttribute(target, "data-tooltip-stickto", defaultOptions.stickTo) }; createTooltip(target,options,DOMTooltips); }); } function getElementsBySelector(selector, context){ var nodes=[]; try { nodes=Array.prototype.slice.call((context||document).querySelectorAll(selector)); } catch (exc){} return nodes; } function createUserTooltips(userTooltipsOptions){ userTooltipsOptions.forEach(function(options){ var targets=[]; if(options.targetSelector) targets=getElementsBySelector(options.targetSelector); targets.forEach(function(target){ createTooltip(target,options,userTooltips); }); }); } var html5tooltips=function(userTooltipsOptions){ if(!Array.isArray(userTooltipsOptions)) userTooltipsOptions=[userTooltipsOptions]; createUserTooltips(userTooltipsOptions); }; html5tooltips.autoinit= html5tooltips.refresh=function(){ createDOMTooltips(); }; html5tooltips.getTooltipByTarget=function(target){ for(var i=userTooltips.length;i--;) if(userTooltips[i].model.target===target) return userTooltips[i]; for(var i=DOMTooltips.length;i--;) if(DOMTooltips[i].model.target===target) return DOMTooltips[i]; }; function documentLoaded(){ document.removeEventListener("DOMContentLoaded",documentLoaded, false); window.removeEventListener("load",documentLoaded, false); html5tooltips.refresh(); } if(typeof window!=='undefined'){ if(document.readyState==="complete"){ documentLoaded(); }else{ document.addEventListener("DOMContentLoaded",documentLoaded, false); window.addEventListener("load", documentLoaded, false); } if(!window.html5tooltipsPredefined){ window.html5tooltipsPredefined=html5tooltipsPredefined; window.HTML5TooltipUIComponent=HTML5TooltipUIComponent; }} return html5tooltips; })); ;(function($,window,document,undefined){var name="jPages",instance=null,defaults={containerID:"",first:false,previous:"‹",next:"›",last:false,links:"numeric",startPage:1,perPage:10,midRange:5,startRange:1,endRange:1,keyBrowse:false,scrollBrowse:false,pause:0,clickStop:false,delay:50,direction:"forward",animation:"",fallback:400,minHeight:true,callback:undefined};function Plugin(element,options){this.options=$.extend({},defaults,options);this._container=$("#"+this.options.containerID);if(!this._container.length)return;this.jQwindow=$(window);this.jQdocument=$(document);this._holder=$(element);this._nav={};this._first=$(this.options.first);this._previous=$(this.options.previous);this._next=$(this.options.next);this._last=$(this.options.last);this._items=this._container.children(":visible");this._itemsShowing=$([]);this._itemsHiding=$([]);this._numPages=Math.ceil(this._items.length/this.options.perPage);this._currentPageNum=this.options.startPage;this._clicked=false;this._cssAnimSupport=this.getCSSAnimationSupport();this.init();}Plugin.prototype={constructor:Plugin,getCSSAnimationSupport:function(){var animation=false,animationstring='animation',keyframeprefix='',domPrefixes='Webkit Moz O ms Khtml'.split(' '),pfx='',elm=this._container.get(0);if(elm.style.animationName)animation=true;if(animation===false){for(var i=0;i
";return navhtml;},writeBtn:function(which){return this.options[which]!==false&&!$(this["_"+which]).length?""+this.options[which]+"":"";},cacheNavElements:function(holder,index){this._nav[index]={};this._nav[index].holder=holder;this._nav[index].first=this._first.length?this._first:this._nav[index].holder.find("a.jp-first");this._nav[index].previous=this._previous.length?this._previous:this._nav[index].holder.find("a.jp-previous");this._nav[index].next=this._next.length?this._next:this._nav[index].holder.find("a.jp-next");this._nav[index].last=this._last.length?this._last:this._nav[index].holder.find("a.jp-last");this._nav[index].fstBreak=this._nav[index].holder.find("span:first");this._nav[index].lstBreak=this._nav[index].holder.find("span:last");this._nav[index].pages=this._nav[index].holder.find("a").not(".jp-first, .jp-previous, .jp-next, .jp-last");this._nav[index].permPages=this._nav[index].pages.slice(0,this.options.startRange).add(this._nav[index].pages.slice(this._numPages-this.options.endRange,this._numPages));this._nav[index].pagesShowing=$([]);this._nav[index].currentPage=$([]);},bindNavHandlers:function(index){var nav=this._nav[index];nav.holder.bind("click.jPages",this.bind(function(evt){var newPage=this.getNewPage(nav,$(evt.target));if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}evt.preventDefault();},this));if(this._first.length){this._first.bind("click.jPages",this.bind(function(){if(this.validNewPage(1)){this._clicked=true;this.paginate(1);}},this));}if(this._previous.length){this._previous.bind("click.jPages",this.bind(function(){var newPage=this._currentPageNum-1;if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}},this));}if(this._next.length){this._next.bind("click.jPages",this.bind(function(){var newPage=this._currentPageNum+1;if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}},this));}if(this._last.length){this._last.bind("click.jPages",this.bind(function(){if(this.validNewPage(this._numPages)){this._clicked=true;this.paginate(this._numPages);}},this));}},disableNavSelection:function(element){if(typeof element.onselectstart!="undefined")element.onselectstart=function(){return false;};else if(typeof element.style.MozUserSelect!="undefined")element.style.MozUserSelect="none";else element.onmousedown=function(){return false;};},bindNavKeyBrowse:function(){this.jQdocument.bind("keydown.jPages",this.bind(function(evt){var target=evt.target.nodeName.toLowerCase();if(this.elemScrolledIntoView()&&target!=="input"&&target!="textarea"){var newPage=this._currentPageNum;if(evt.which==37)newPage=this._currentPageNum-1;if(evt.which==39)newPage=this._currentPageNum+1;if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}}},this));},elemScrolledIntoView:function(){var docViewTop,docViewBottom,elemTop,elemBottom;docViewTop=this.jQwindow.scrollTop();docViewBottom=docViewTop+this.jQwindow.height();elemTop=this._container.offset().top;elemBottom=elemTop+this._container.height();return((elemBottom>=docViewTop)&&(elemTop<=docViewBottom));},bindNavScrollBrowse:function(){this._container.bind("mousewheel.jPages DOMMouseScroll.jPages",this.bind(function(evt){var newPage=(evt.originalEvent.wheelDelta||-evt.originalEvent.detail)>0?(this._currentPageNum-1):(this._currentPageNum+1);if(this.validNewPage(newPage)){this._clicked=true;this.paginate(newPage);}evt.preventDefault();return false;},this));},getNewPage:function(nav,target){if(target.is(nav.currentPage))return this._currentPageNum;if(target.is(nav.pages))return nav.pages.index(target)+1;if(target.is(nav.first))return 1;if(target.is(nav.last))return this._numPages;if(target.is(nav.previous))return nav.pages.index(nav.currentPage);if(target.is(nav.next))return nav.pages.index(nav.currentPage)+2;},validNewPage:function(newPage){return newPage!==this._currentPageNum&&newPage>0&&newPage<=this._numPages;},paginate:function(page){var itemRange,pageInterval;itemRange=this.updateItems(page);pageInterval=this.updatePages(page);this._currentPageNum=page;if($.isFunction(this.options.callback))this.callback(page,itemRange,pageInterval);this.updatePause();},updateItems:function(page){var range=this.getItemRange(page);this._itemsHiding=this._itemsShowing;this._itemsShowing=this._items.slice(range.start,range.end);if(this._cssAnimSupport&&this.options.animation.length)this.cssAnimations(page);else this.jQAnimations(page);return range;},getItemRange:function(page){var range={};range.start=(page-1)*this.options.perPage;range.end=range.start+this.options.perPage;if(range.end>this._items.length)range.end=this._items.length;return range;},cssAnimations:function(page){clearInterval(this._delay);this._itemsHiding.removeClass(this.options.animation+" jp-invisible").addClass("jp-hidden");this._itemsShowing.removeClass("jp-hidden").addClass("jp-invisible");this._itemsOriented=this.getDirectedItems(page);this._index=0;this._delay=setInterval(this.bind(function(){if(this._index===this._itemsOriented.length)clearInterval(this._delay);else{this._itemsOriented.eq(this._index).removeClass("jp-invisible").addClass(this.options.animation);}this._index=this._index+1;},this),this.options.delay);},jQAnimations:function(page){clearInterval(this._delay);this._itemsHiding.addClass("jp-hidden");this._itemsShowing.fadeTo(0,0).removeClass("jp-hidden");this._itemsOriented=this.getDirectedItems(page);this._index=0;this._delay=setInterval(this.bind(function(){if(this._index===this._itemsOriented.length)clearInterval(this._delay);else{this._itemsOriented.eq(this._index).fadeTo(this.options.fallback,1);}this._index=this._index+1;},this),this.options.delay);},getDirectedItems:function(page){var itemsToShow;switch(this.options.direction){case"backwards":itemsToShow=$(this._itemsShowing.get().reverse());break;case"random":itemsToShow=$(this._itemsShowing.get().sort(function(){return(Math.round(Math.random())-0.5);}));break;case"auto":itemsToShow=page>=this._currentPageNum?this._itemsShowing:$(this._itemsShowing.get().reverse());break;default:itemsToShow=this._itemsShowing;}return itemsToShow;},updatePages:function(page){var interval,index,nav;interval=this.getInterval(page);for(index in this._nav){if(this._nav.hasOwnProperty(index)){nav=this._nav[index];this.updateBtns(nav,page);this.updateCurrentPage(nav,page);this.updatePagesShowing(nav,interval);this.updateBreaks(nav,interval);}}return interval;},getInterval:function(page){var neHalf,upperLimit,start,end;neHalf=Math.ceil(this.options.midRange/2);upperLimit=this._numPages-this.options.midRange;start=page>neHalf?Math.max(Math.min(page-neHalf,upperLimit),0):0;end=page>neHalf?Math.min(page+neHalf-(this.options.midRange%2>0?1:0),this._numPages):Math.min(this.options.midRange,this._numPages);return{start:start,end:end};},updateBtns:function(nav,page){if(page===1){nav.first.addClass("jp-disabled");nav.previous.addClass("jp-disabled");}if(page===this._numPages){nav.next.addClass("jp-disabled");nav.last.addClass("jp-disabled");}if(this._currentPageNum===1&&page>1){nav.first.removeClass("jp-disabled");nav.previous.removeClass("jp-disabled");}if(this._currentPageNum===this._numPages&&pagethis.options.startRange||(this.options.startRange===0&&interval.start>0))nav.fstBreak.removeClass("jp-hidden");else nav.fstBreak.addClass("jp-hidden");if(interval.end1){clearTimeout(this._pause);if(this.options.clickStop&&this._clicked)return;else{this._pause=setTimeout(this.bind(function(){this.paginate(this._currentPageNum!==this._numPages?this._currentPageNum+1:1);},this),this.options.pause);}}},setMinHeight:function(){if(this.options.minHeight&&!this._container.is("table, tbody")){setTimeout(this.bind(function(){this._container.css({"min-height":this._container.css("height")});},this),1000);}},bind:function(fn,me){return function(){return fn.apply(me,arguments);};},destroy:function(){this.jQdocument.unbind("keydown.jPages");this._container.unbind("mousewheel.jPages DOMMouseScroll.jPages");if(this.options.minHeight)this._container.css("min-height","");if(this._cssAnimSupport&&this.options.animation.length)this._items.removeClass("animated jp-hidden jp-invisible "+this.options.animation);else this._items.removeClass("jp-hidden").fadeTo(0,1);this._holder.unbind("click.jPages").empty();}};$.fn[name]=function(arg){var type=$.type(arg);if(type==="object"){if(this.length&&!$.data(this,name)){instance=new Plugin(this,arg);this.each(function(){$.data(this,name,instance);});}return this;}if(type==="string"&&arg==="destroy"){instance.destroy();this.each(function(){$.removeData(this,name);});return this;}if(type==='number'&&arg%1===0){if(instance.validNewPage(arg))instance.paginate(arg);return this;}return this;};})(jQuery,window,document); var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function($){function a(){this.feeds={},this.options=sb_instagram_js_options}function b(a,b,c){this.el=a,this.index=b,this.settings=c,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.page=1,this.isInitialized=!1}function c(a,b){$.ajax({url:sbiajaxurl,type:"post",data:a,success:b})}a.prototype={createPage:function(a,b){void 0!==sb_instagram_js_options.ajax_url&&void 0===window.sbiajaxurl&&(window.sbiajaxurl=sb_instagram_js_options.ajax_url),(void 0===window.sbiajaxurl||-1===window.sbiajaxurl.indexOf(window.location.hostname))&&(window.sbiajaxurl=location.protocol+"//"+window.location.hostname+"/wp-admin/admin-ajax.php"),$("#sbi-builder-app").length&&void 0===window.sbiresizedImages&&$(".sbi_resized_image_data").length&&void 0!==$(".sbi_resized_image_data").attr("data-resized")&&0===$(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(window.sbiresizedImages=JSON.parse($(".sbi_resized_image_data").attr("data-resized")),$(".sbi_resized_image_data").remove()),$(".sbi_no_js_error_message").remove(),$(".sbi_no_js").removeClass("sbi_no_js"),a(b)},createFeeds:function(a){a.whenFeedsCreated($(".sbi").each(function(e){$(this).attr("data-sbi-index",e+1);var a=$(this),d=void 0!==a.attr("data-sbi-flags")?a.attr("data-sbi-flags").split(","):[],j=void 0!==a.attr("data-options")?JSON.parse(a.attr("data-options")):{};d.indexOf("testAjax")> -1&&(window.sbi.triggeredTest=!0,c({action:"sbi_on_ajax_test_trigger"},function(a){console.log("did test")}));var f,g,h,k={cols:a.attr("data-cols"),colsmobile:void 0!==a.attr("data-colsmobile")&&"same"!==a.attr("data-colsmobile")?a.attr("data-colsmobile"):a.attr("data-cols"),colstablet:void 0!==a.attr("data-colstablet")&&"same"!==a.attr("data-colstablet")?a.attr("data-colstablet"):a.attr("data-cols"),num:a.attr("data-num"),imgRes:a.attr("data-res"),feedID:a.attr("data-feedid"),postID:"undefind"!=typeof a.attr("data-postid")?a.attr("data-postid"):"unknown",shortCodeAtts:a.attr("data-shortcode-atts"),resizingEnabled:-1===d.indexOf("resizeDisable"),imageLoadEnabled:-1===d.indexOf("imageLoadDisable"),debugEnabled:d.indexOf("debug")> -1,favorLocal:d.indexOf("favorLocal")> -1,ajaxPostLoad:d.indexOf("ajaxPostLoad")> -1,gdpr:d.indexOf("gdpr")> -1,overrideBlockCDN:d.indexOf("overrideBlockCDN")> -1,consentGiven:!1,locator:d.indexOf("locator")> -1,autoMinRes:1,general:j};window.sbi.feeds[e]=(f=this,g=e,h=k,new b(f,g,h)),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var i=jQuery.Event("sbiafterfeedcreate");i.feed=window.sbi.feeds[e],jQuery(window).trigger(i)}))},afterFeedsCreated:function(){$(".sb_instagram_header").each(function(){var a=$(this);a.find(".sbi_header_link").on("mouseenter mouseleave",function(b){switch(b.type){case"mouseenter":a.find(".sbi_header_img_hover").addClass("sbi_fade_in");break;case"mouseleave":a.find(".sbi_header_img_hover").removeClass("sbi_fade_in")}})})},encodeHTML:function(b){if(void 0===b)return"";var a=b.replace(/(>)/g,">"),a=a.replace(/(<)/g,"<");return(a=a.replace(/(<br\/>)/g,"
")).replace(/(<br>)/g,"
")},urlDetect:function(a){return a.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)}},b.prototype={init:function(){var b,a=this;a.settings.consentGiven=a.checkConsent(),$(this.el).find(".sbi_photo").parent("p").length&&$(this.el).addClass("sbi_no_autop"),$(this.el).find("#sbi_mod_error").length&&$(this.el).prepend($(this.el).find("#sbi_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var c=(b=0,function(a,c){clearTimeout(b),b=setTimeout(a,c)});jQuery(window).on("resize",function(){c(function(){a.afterResize()},500)}),$(this.el).find(".sbi_item").each(function(){a.lazyLoadCheck($(this))})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(a){a.find(".sbi_loader").removeClass("sbi_hidden"),a.find(".sbi_btn_text").addClass("sbi_hidden"),a.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var a=$(this.el),b=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){a.find(".sbi_loader").addClass("sbi_hidden"),a.find(".sbi_btn_text").removeClass("sbi_hidden"),b.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var a=$(this.el);a.find(".sbi-screenreader").each(function(){$(this).find("img").remove()}),"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),a.find(".sbi_item").each(function(a){jQuery(this).find(".sbi_photo").on("mouseenter mouseleave",function(a){switch(a.type){case"mouseenter":jQuery(this).fadeTo(200,.85);break;case"mouseleave":jQuery(this).stop().fadeTo(500,1)}})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var b=10;a.find(".sbi_transition").each(function(){var a=jQuery(this);setTimeout(function(){a.removeClass("sbi_transition")},b),b+=10})},500)},lazyLoadCheck:function(a){if(a.find(".sbi_photo").length&&!a.closest(".sbi").hasClass("sbi-no-ll-check")){var b=this.getImageUrls(a),c=void 0!==b[640]?b[640]:a.find(".sbi_photo").attr("data-full-res");!(!this.settings.consentGiven&&c.indexOf("scontent")> -1)&&a.find(".sbi_photo img").each(function(){c&&void 0!==$(this).attr("data-src")&&$(this).attr("data-src",c),c&&void 0!==$(this).attr("data-orig-src")&&$(this).attr("data-orig-src",c),$(this).on("load",function(){!$(this).hasClass("sbi-replaced")&&$(this).attr("src").indexOf("placeholder")> -1&&($(this).addClass("sbi-replaced"),c&&($(this).attr("src",c),$(this).closest(".sbi_imgLiquid_bgSize").length&&$(this).closest(".sbi_imgLiquid_bgSize").css("background-image","url("+c+")")))})})}},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||$(".sbi_no_resraise").removeClass("sbi_no_resraise");var a=$.Event("sbiafterimagesloaded");a.el=$(this.el),$(window).trigger(a)},setResizedImages:function(){$(this.el).find(".sbi_resized_image_data").length&&void 0!==$(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===$(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')?(this.resizedImages=JSON.parse($(this.el).find(".sbi_resized_image_data").attr("data-resized")),$(this.el).find(".sbi_resized_image_data").remove()):void 0!==window.sbiresizedImages&&(this.resizedImages=window.sbiresizedImages)},sendNeedsResizingToServer:function(){var a=this,d=$(this.el);if(a.needsResizing.length>0&&a.settings.resizingEnabled){var g=$(this.el).find(".sbi_item").length,h=void 0!==a.settings.general.cache_all&&a.settings.general.cache_all,b="";if(void 0!==d.attr("data-locatornonce")&&(b=d.attr("data-locatornonce")),$("#sbi-builder-app").length){if(void 0!==window.sbiresizeTriggered&&window.sbiresizeTriggered)return;window.sbiresizeTriggered=!0}var e={action:"sbi_resized_images_submit",needs_resizing:a.needsResizing,offset:g,feed_id:a.settings.feedID,atts:a.settings.shortCodeAtts,location:a.locationGuess(),post_id:a.settings.postID,cache_all:h,locator_nonce:b},f=function(c){var b=c;for(var d in"object"!=typeof c&&0===c.trim().indexOf("{")&&(b=JSON.parse(c.trim())),a.settings.debugEnabled&&console.log(b),b)b.hasOwnProperty(d)&&(a.resizedImages[d]=b[d]);a.maybeRaiseImageResolution(),setTimeout(function(){a.afterResize()},500),$("#sbi-builder-app").length&&(window.sbiresizeTriggered=!1)};c(e,f)}else if(a.settings.locator){var b="";void 0!==d.attr("data-locatornonce")&&(b=d.attr("data-locatornonce"));var e={action:"sbi_do_locator",feed_id:a.settings.feedID,atts:a.settings.shortCodeAtts,location:a.locationGuess(),post_id:a.settings.postID,locator_nonce:b},f=function(a){};c(e,f)}},loadMoreButtonInit:function(){var a=$(this.el),b=this;a.find("#sbi_load .sbi_load_btn").off().on("click",function(){b.afterLoadMoreClicked(jQuery(this)),b.getNewPostSet()})},getNewPostSet:function(){var b=$(this.el),a=this;a.page++;var d="";void 0!==b.attr("data-locatornonce")&&(d=b.attr("data-locatornonce"));var e={action:"sbi_load_more_clicked",offset:b.find(".sbi_item").length,page:a.page,feed_id:a.settings.feedID,atts:a.settings.shortCodeAtts,location:a.locationGuess(),post_id:a.settings.postID,current_resolution:a.imageResolution,locator_nonce:d};c(e,function(d){var c=d;"object"!=typeof d&&0===d.trim().indexOf("{")&&(c=JSON.parse(d.trim())),a.settings.debugEnabled&&console.log(c),a.appendNewPosts(c.html),a.addResizedImages(c.resizedImages),a.settings.ajaxPostLoad?(a.settings.ajaxPostLoad=!1,a.afterInitialImagesLoaded()):a.afterNewImagesLoaded(),c.feedStatus.shouldPaginate?a.outOfPages=!1:(a.outOfPages=!0,b.find(".sbi_load_btn").hide()),$(".sbi_no_js").removeClass("sbi_no_js")})},appendNewPosts:function(b){var a=$(this.el);a.find("#sbi_images .sbi_item").length?a.find("#sbi_images .sbi_item").last().after(b):a.find("#sbi_images").append(b)},addResizedImages:function(a){for(var b in a)this.resizedImages[b]=a[b]},setImageHeight:function(){var a=$(this.el),c=a.find(".sbi_photo").eq(0).innerWidth(),d=this.getColumnCount(),b=a.find("#sbi_images").innerWidth()-a.find("#sbi_images").width(),e=b/2;sbi_photo_width_manual=a.find("#sbi_images").width()/d-b,a.find(".sbi_photo").css("height",c),a.find(".sbi-owl-nav").length&&setTimeout(function(){var b=2;a.find(".sbi_owl2row-item").length&&(b=1);var c=a.find(".sbi_photo").eq(0).innerWidth()/b;c+=parseInt(e)*(2+(2-b)),a.find(".sbi-owl-nav div").css("top",c)},100)},maybeRaiseSingleImageResolution:function(a,n,f){var c=this,d=c.getImageUrls(a),e=a.find(".sbi_photo img").attr("src"),h=150,i=a.find("img").get(0),j=e===window.sbi.options.placeholder?1:i.naturalWidth/i.naturalHeight,f=void 0!==f&&f;if(!(a.hasClass("sbi_no_resraise")||a.hasClass("sbi_had_error")||a.find(".sbi_link_area").length&&a.find(".sbi_link_area").hasClass("sbi_had_error"))){if(d.length<1){a.find(".sbi_link_area").length&&a.find(".sbi_link_area").attr("href",window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png"));return}(a.find(".sbi_link_area").length&&a.find(".sbi_link_area").attr("href")===window.sbi.options.placeholder.replace("placeholder.png","thumb-placeholder.png")||!c.settings.consentGiven)&&a.find(".sbi_link_area").attr("href",d[d.length-1]),void 0!==d[640]&&a.find(".sbi_photo").attr("data-full-res",d[640]),$.each(d,function(a,b){b===e&&(h=parseInt(a),f=!1)});var b=640;switch(c.settings.imgRes){case"thumb":b=150;break;case"medium":b=320;break;case"full":b=640;break;default:var k=Math.max(c.settings.autoMinRes,a.find(".sbi_photo").innerWidth()),l=c.getBestResolutionForAuto(k,j,a);switch(l){case 320:b=320;break;case 150:b=150}}if(b>h||e===window.sbi.options.placeholder||f){if(c.settings.debugEnabled){var m=e===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+e,m)}var g=d[b].split("?ig_cache_key")[0];if(e!==g&&(a.find(".sbi_photo img").attr("src",g),a.find(".sbi_photo").css("background-image",'url("'+g+'")')),h=b,"auto"===c.settings.imgRes){var o=!1;a.find(".sbi_photo img").on("load",function(){var f=$(this),i=f.get(0).naturalWidth/f.get(0).naturalHeight;if(1e3!==f.get(0).naturalWidth&&i>j&&!o){switch(c.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+e),o=!0,k=a.find(".sbi_photo").innerWidth(),l=c.getBestResolutionForAuto(k,i,a),b=640,l){case 320:b=320;break;case 150:b=150}b>h&&(g=d[b].split("?ig_cache_key")[0],f.attr("src",g),f.closest(".sbi_photo").css("background-image",'url("'+g+'")')),("masonry"===c.layout||"highlight"===c.layout)&&($(c.el).find("#sbi_images").smashotope(c.isotopeArgs),setTimeout(function(){$(c.el).find("#sbi_images").smashotope(c.isotopeArgs)},500))}else if(c.settings.debugEnabled){var m=o?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+e,m)}})}}a.find("img").on("error",function(){if($(this).hasClass("sbi_img_error"))console.log("unfixed error "+$(this).attr("src"));else{if($(this).addClass("sbi_img_error"),!($(this).attr("src").indexOf("media/?size=")> -1||$(this).attr("src").indexOf("cdninstagram")> -1||$(this).attr("src").indexOf("fbcdn")> -1)&&c.settings.consentGiven){if("undefined"!==$(this).closest(".sbi_photo").attr("data-img-src-set")){var a=JSON.parse($(this).closest(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/"));void 0!==a.d&&($(this).attr("src",a.d),$(this).closest(".sbi_photo").css("background-image","url("+a.d+")"),$(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",a[640]).addClass("sbi_had_error"))}}else{c.settings.favorLocal=!0;var a=c.getImageUrls($(this).closest(".sbi_item"));void 0!==a[640]&&($(this).attr("src",a[640]),$(this).closest(".sbi_photo").css("background-image","url("+a[640]+")"),$(this).closest(".sbi_item").addClass("sbi_had_error").find(".sbi_link_area").attr("href",a[640]).addClass("sbi_had_error"))}setTimeout(function(){c.afterResize()},1500)}})}},maybeRaiseImageResolution:function(b){var a=this,c=!a.isInitialized;$(a.el).find(void 0!==b&&!0===b?".sbi_item.sbi_new":".sbi_item").each(function(b){!$(this).hasClass("sbi_num_diff_hide")&&$(this).find(".sbi_photo").length&&void 0!==$(this).find(".sbi_photo").attr("data-img-src-set")&&a.maybeRaiseSingleImageResolution($(this),b,c)}),a.isInitialized=!0},getBestResolutionForAuto:function(d,a,e){(isNaN(a)||a<1)&&(a=1);var b=10*Math.ceil(d*a/10),c=[150,320,640];if(e.hasClass("sbi_highlighted")&&(b*=2),-1===c.indexOf(parseInt(b))){var f=!1;$.each(c,function(c,a){a>parseInt(b)&&!f&&(b=a,f=!0)})}return b},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var a=$(this.el),b=void 0!==a.attr("data-num")&&""!==a.attr("data-num")?parseInt(a.attr("data-num")):1,c=void 0!==a.attr("data-nummobile")&&""!==a.attr("data-nummobile")?parseInt(a.attr("data-nummobile")):b;480>$(window).width()||"mobile"===window.sbi_preview_device?c120&&b<240?a.addClass("sbi_medium"):b<=120&&a.addClass("sbi_small")},setMinImageWidth:function(){$(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=$(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(d){var c=JSON.parse(d.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),a=d.attr("id").replace("sbi_","");if(this.settings.consentGiven||this.settings.overrideBlockCDN||(c=[]),void 0!==this.resizedImages[a]&&"video"!==this.resizedImages[a]&&"pending"!==this.resizedImages[a]&&"error"!==this.resizedImages[a].id&&"video"!==this.resizedImages[a].id&&"pending"!==this.resizedImages[a].id){if(void 0!==this.resizedImages[a].sizes){var b=[];void 0!==this.resizedImages[a].sizes.full&&(c[640]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"full.jpg",b.push(640)),void 0!==this.resizedImages[a].sizes.low&&(c[320]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"low.jpg",b.push(320)),void 0!==this.resizedImages[a].sizes.thumb&&(b.push(150),c[150]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"thumb.jpg"),this.settings.favorLocal&&(-1===b.indexOf(640)&&b.indexOf(320)> -1&&(c[640]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"low.jpg"),-1===b.indexOf(320)&&(b.indexOf(640)> -1?c[320]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"full.jpg":b.indexOf(150)> -1&&(c[320]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"thumb.jpg")),-1===b.indexOf(150)&&(b.indexOf(320)> -1?c[150]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"low.jpg":b.indexOf(640)> -1&&(c[150]=sb_instagram_js_options.resized_url+this.resizedImages[a].id+"full.jpg")))}}else(void 0===this.resizedImages[a]||void 0!==this.resizedImages[a].id&&"pending"!==this.resizedImages[a].id&&"error"!==this.resizedImages[a].id)&&this.addToNeedsResizing(a);return c},getAvatarUrl:function(a,c){if(""===a)return"";var b=this.settings.general.avatars,c=void 0!==c?c:"local";return"local"===c?void 0!==b["LCL"+a]&&1===parseInt(b["LCL"+a])?sb_instagram_js_options.resized_url+a+".jpg":void 0!==b[a]?b[a]:"":void 0!==b[a]?b[a]:void 0!==b["LCL"+a]&&1===parseInt(b["LCL"+a])?sb_instagram_js_options.resized_url+a+".jpg":""},addToNeedsResizing:function(a){-1===this.needsResizing.indexOf(a)&&this.needsResizing.push(a)},applyImageLiquid:function(){var b,c,d,a,e=$(this.el);(b=b||{VER:"0.9.944"}).bgs_Available=!1,b.bgs_CheckRunned=!1,function(a){a.fn.extend({sbi_imgLiquid:function(c){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!b.bgs_CheckRunned){b.bgs_CheckRunned=!0;var c=a('');a("body").append(c),function(){var d=c[0];if(d&&window.getComputedStyle){var a=window.getComputedStyle(d,null);a&&a.backgroundSize&&(b.bgs_Available="cover"===a.backgroundSize)}}(),c.remove()}}();var d=this;return this.options=c,this.settings=a.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(g){function h(){function d(){f.data("sbi_imgLiquid_error")||f.data("sbi_imgLiquid_loaded")||f.data("sbi_imgLiquid_oldProcessed")||(e.is(":visible")&&f[0].complete&&f[0].width>0&&f[0].height>0?(f.data("sbi_imgLiquid_loaded",!0),setTimeout(l,g*c.delay)):setTimeout(d,c.timecheckvisibility))}if(f.data("oldSrc")&&f.data("oldSrc")!==f.attr("src")){var b=f.clone().removeAttr("style");return b.data("sbi_imgLiquid_settings",f.data("sbi_imgLiquid_settings")),f.parent().prepend(b),f.remove(),(f=b)[0].width=0,void setTimeout(h,10)}return f.data("sbi_imgLiquid_oldProcessed")?void l():(f.data("sbi_imgLiquid_oldProcessed",!1),f.data("oldSrc",f.attr("src")),a("img:not(:first)",e).css("display","none"),e.css({overflow:"hidden"}),f.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),f.on("error",i),f[0].onerror=i,d(),void k())}function k(){(c.responsive||f.data("sbi_imgLiquid_oldProcessed"))&&f.data("sbi_imgLiquid_settings")&&(c=f.data("sbi_imgLiquid_settings"),e.actualSize=e.get(0).offsetWidth+e.get(0).offsetHeight/1e4,e.sizeOld&&e.actualSize!==e.sizeOld&&l(),e.sizeOld=e.actualSize,setTimeout(k,c.responsiveCheckTime))}function i(){f.data("sbi_imgLiquid_error",!0),e.addClass("sbi_imgLiquid_error"),c.onItemError&&c.onItemError(g,e,f),j()}function l(){var i,k,l,m,a,b,n,o,d=0,h=0,p=e.width(),q=e.height();void 0===f.data("owidth")&&f.data("owidth",f[0].width),void 0===f.data("oheight")&&f.data("oheight",f[0].height),c.fill===p/q>=f.data("owidth")/f.data("oheight")?(i="100%",k="auto",l=Math.floor(p),m=Math.floor(p*(f.data("oheight")/f.data("owidth")))):(i="auto",k="100%",l=Math.floor(q*(f.data("owidth")/f.data("oheight"))),m=Math.floor(q)),a=c.horizontalAlign.toLowerCase(),n=p-l,"left"===a&&(h=0),"center"===a&&(h=.5*n),"right"===a&&(h=n),-1!==a.indexOf("%")&&(a=parseInt(a.replace("%",""),10))>0&&(h=n*a*.01),b=c.verticalAlign.toLowerCase(),o=q-m,"left"===b&&(d=0),"center"===b&&(d=.5*o),"bottom"===b&&(d=o),-1!==b.indexOf("%")&&(b=parseInt(b.replace("%",""),10))>0&&(d=o*b*.01),c.hardPixels&&(i=l,k=m),f.css({width:i,height:k,"margin-left":Math.floor(h),"margin-top":Math.floor(d)}),f.data("sbi_imgLiquid_oldProcessed")||(f.fadeTo(c.fadeInTime,1),f.data("sbi_imgLiquid_oldProcessed",!0),c.removeBoxBackground&&e.css("background-image","none"),e.addClass("sbi_imgLiquid_nobgSize"),e.addClass("sbi_imgLiquid_ready")),c.onItemFinish&&c.onItemFinish(g,e,f),j()}function j(){g===d.length-1&&d.settings.onFinish&&d.settings.onFinish()}var c=d.settings,e=a(this),f=a("img:first",e);return f.length?(f.data("sbi_imgLiquid_settings")?(e.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),c=a.extend({},f.data("sbi_imgLiquid_settings"),d.options)):c=a.extend({},d.settings,function(){var f={};if(d.settings.useDataHtmlAttr){var g=e.attr("data-sbi_imgLiquid-fill"),a=e.attr("data-sbi_imgLiquid-horizontalAlign"),c=e.attr("data-sbi_imgLiquid-verticalAlign");("true"===g||"false"===g)&&(f.fill=Boolean("true"===g)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(f.horizontalAlign=a),void 0===c||"top"!==c&&"bottom"!==c&&"center"!==c&&-1===c.indexOf("%")||(f.verticalAlign=c)}return b.isIE&&d.settings.ieFadeInDisabled&&(f.fadeInTime=0),f}()),f.data("sbi_imgLiquid_settings",c),c.onItemStart&&c.onItemStart(g,e,f),void(b.bgs_Available&&c.useBackgroundSize?(-1===e.css("background-image").indexOf(encodeURI(f.attr("src")))&&e.css({"background-image":'url("'+encodeURI(f.attr("src"))+'")'}),e.css({"background-size":c.fill?"cover":"contain","background-position":(c.horizontalAlign+" "+c.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),a("a:first",e).css({display:"block",width:"100%",height:"100%"}),a("img",e).css({display:"none"}),c.onItemFinish&&c.onItemFinish(g,e,f),e.addClass("sbi_imgLiquid_bgSize"),e.addClass("sbi_imgLiquid_ready"),j()):h())):void i()})}})}(jQuery),c=b.injectCss,d=document.getElementsByTagName("head")[0],a=document.createElement("style"),a.type="text/css",a.styleSheet?a.styleSheet.cssText=c:a.appendChild(document.createTextNode(c)),d.appendChild(a),"function"==typeof e.find(".sbi_photo").sbi_imgLiquid&&e.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var a,b,c,d=this;a=jQuery,b={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},(c={}).sbiCheckVisibility=function(b,a){if(jQuery.contains(document,b[0])){var e=a.sbiPreviousVisibility,d=b.is(":visible");a.sbiPreviousVisibility=d,null==e?a.runOnLoad&&a.callback(b,d):e!==d&&a.callback(b,d),setTimeout(function(){c.sbiCheckVisibility(b,a)},a.frequency)}},a.fn.sbiVisibilityChanged=function(d){var e=a.extend({},b,d);return this.each(function(){c.sbiCheckVisibility(a(this),e)})},"function"==typeof $(this.el).filter(":hidden").sbiVisibilityChanged&&$(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(a,b){d.afterResize()},runOnLoad:!1})},getColumnCount:function(){var c=$(this.el),a=this.settings.cols,d=this.settings.colsmobile,e=this.settings.colstablet,b=a;return sbiWindowWidth=window.innerWidth,c.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(a)>2&&7>parseInt(a)&&(b=2),sbiWindowWidth<640&&parseInt(a)>6&&11>parseInt(a)&&(b=4),sbiWindowWidth<=480&&parseInt(a)>2&&(b=1)):sbiWindowWidth>480&&sbiWindowWidth<=800?b=e:sbiWindowWidth<=480&&(b=d),parseInt(b)},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var a=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===a.length){var c=a.pop().split(";").shift();this.settings.consentGiven="true"===c}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(e){for(var c=e+"=",d=window.document.cookie.split(";"),a=0;a